import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger"
import { IsNotEmpty } from "class-validator"

export class CreateMenuDto {
  @ApiProperty({ description: '菜品名称', default: '' })
  @IsNotEmpty({ message: '菜品名称必填' })
  readonly name: string

  @ApiProperty({ description: '菜品价格', default: '' })
  @IsNotEmpty({ message: '菜品价格必填' })
  readonly fee: number

  @ApiProperty({ description: '菜品类型：1热门美食 2清淡小炒 3时蔬类 4凉拌类 5红烧类 6汤类 7主食', default: '' })
  @IsNotEmpty({ message: '菜品类型必填' })
  readonly type: number

  @ApiPropertyOptional({ description: '菜品图片', default: '' })
  readonly photo_url?: string

  @ApiPropertyOptional({ description: '菜品描述', default: '' })
  readonly description?: string

  @ApiPropertyOptional({ description: '配料表', default: '' })
  readonly ingredients?: string
}